package com.housekeeper.common.exception;

import com.housekeeper.common.response.ResponseEnum;
import lombok.Data;

/**
 * 自定义业务异常类
 */
@Data
public class HKException extends RuntimeException{
    private Integer status;//状态码
    public HKException(ResponseEnum responseEnum){
        super(responseEnum.getErrorMessage());
        this.status = responseEnum.getCode();
    }
    public HKException(Integer status, String message){
        super(message);
        this.status = status;
    }
}

